Method for adjusting saturation and contrast of an area of an image and apparatus thereof

ABSTRACT

A method for adjusting saturation of an area of an image is disclosed. The method includes calculating a deviation level of a pixel in the area of the image by a processor and calculating a modified saturation value of the pixel in the area of the image according to the deviation level of the pixel in the area of the image and an original saturation value of the pixel in the area of the image by the processor. The deviation level indicates brightness differences of the brightness values among the pixel and a pixel set in a vicinity of the pixel in the area of the image. The pixel set includes pixels in the vicinity of the pixel of the area of the image.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.60/824,298, filed 2006 Sep. 1 and U.S. application Ser. No. 11/834,693,filed 2007 Aug. 7 now U.S. Pat. No. 7,602,988, included herein in theirentirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention provides a method for adjusting saturation andcontrast of an area of an image, and more particularly, a method foradjusting brightness and saturation of a pixel in the area of the imageto achieve saturation and contrast adjustment of the area of the imageaccording to a brightness deviation level between the pixel and a pixelset in the vicinity of the pixel.

2. Description of the Prior Art

When high definition (HD) applications are becoming more and morepopular, image quality displayed by an electronic device is higher andhigher. Most devices include various preference settings for differentusers. Products for displaying images, like a television, a projector ora computer display, usually provide a user with an interface to adjustcontrast, saturation or other parameters to make the screen outputcloser to expectations of the user.

In conventional designs to adjust contrast of a screen, some statisticaldata of an image are calculated and then the brightness parameter ofeach pixel is multiplied with a factor that is looked up from a table orcalculated using a function. Adjustment of saturation of an image on ascreen is performed similarly. If there is better way to enhance suchadjustments, users may have better experiences when using enhancedapparatuses having higher image quality.

SUMMARY OF THE INVENTION

A first preferred embodiment is a method for adjusting saturation of anarea of an image to be displayed in an electronic system. The electronicsystem comprises a storage unit for storing information of the image.The method comprises calculating a deviation level of a pixel in thearea of the image, and calculating a modified saturation value of thepixel in the area of the image according to the deviation level of thepixel in the area of the image and an original saturation value of thepixel in the area of the image to achieve saturation adjustment of thepixel in the area of the image. The deviation level indicates brightnessdifferences of the brightness values among the pixel and a pixel set ina vicinity of the pixel in the area of the image. The pixel setcomprises pixels in the vicinity of the pixel of the area of the image.

A second preferred embodiment is a method for adjusting contrast of anarea of an image, comprising: calculating a local contrast of a pixelset in a vicinity of a pixel by a processor, wherein the pixel isselected from the area and the pixel set is distributed in a portion ofthe area; calculating a global gain for the area according to brightnesscharacteristic of the area by the processor; and calculating a modifiedbrightness value of the pixel according to the local contrast, theglobal gain and an original brightness value of the pixel by theprocessor, so that contrast of the pixel is adjusted with the modifiedbrightness value of the pixel.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart illustrating a method for adjusting saturation ofan area of an image according to a first embodiment of the presentinvention.

FIG. 2 is a flowchart illustrating detailed steps for generating thedeviation level.

FIG. 3 is a flowchart illustrating a method for adjusting contrast of anarea of an image according to a second embodiment of the presentinvention.

FIG. 4 is a flowchart illustrating detailed steps for generating thedeviation level.

FIG. 5 is a diagram illustrating an electronic apparatus according tothe first embodiment of the present invention.

DETAILED DESCRIPTION

Please refer to FIG. 1. FIG. 1 is a flowchart illustrating a method 100for adjusting saturation of an area of an image according to a firstembodiment of the present invention. The image mentioned in the presentinvention can comprise only one area or a plurality of areas. The areamentioned in the present invention does not have to be rectangular, andinstead, the area can be any shape as desired. The spirit of method 100according to the first embodiment of the present invention is utilizingthe brightness (or luminance or intensity) difference between a pixel inthe area and a pixel set in the vicinity of the pixel to adjust thesaturation of the area. Additionally, the brightness and the saturationmentioned in the present invention can be expressed and defined indifferent color spaces such RGB, HSV, and YC_(b)C_(r). Thetransformations for saturation and brightness between different colorspaces are familiar for those skilled in the art and are omitted.

It is assumed that an area A, a pixel P_(xy) in the area A, and a pixelset P_(mn) of the pixel P_(xy) is selected. The steps are described asfollows:

-   Step 101: Start;-   Step 102: Calculate a deviation level of the pixel P_(xy) in an    area;-   Step 103: Calculate a global gain for the area A;-   Step 104: Calculate a modified saturation value of the pixel    according to the deviation level, the global gain and an original    saturation value of the pixel;-   Step 105: End.

In step 103, the global gain can be obtained according to thecharacteristics of the area A, for example, the size of the global gaincan be decided with the saturation average of the area A.

Therefore, the method 100 can be expressed in the following expressions(1), (2), or (3):S _(modified) =S _(original) ×C _(global) _(—) _(gain) ×D  (1)S _(modified) =S _(original)×[1+(C _(global) _(—) _(gain)−1)×D]  (2)S _(modified) =S _(original) ×D  (3)

wherein S_(modified) designates the modified saturation value of thepixel P_(xy), S_(original) designates the original saturation value ofthe pixel P_(xy), C_(global) _(—) _(gain) designates the global gain forthe area, and D designates the deviation level of the pixel P_(xy).

In the expression (1), the modified saturation value S_(modified) can beadjusted as the global gain C_(global) _(—) _(gain) adjusts.

In the expression (2), the modified saturation value S_(modified)remains unchanged when the global gain C_(global) _(—) _(gain) is set tobe 1, and therefore the expression (2) ignores the deviation level Dwhen the global gain C_(global) _(—) _(gain) is set to be 1.

In the expression (3), the modified saturation value S_(modified) can bemodified only according to the deviation level and ignore the globalgain C_(global) _(—) _(gain).

In step 102, the deviation level of the selected pixel P_(xy) isgenerated according to the brightness differences between the selectedpixel P_(xy) and a pixel set P_(mn) in the vicinity of the selectedpixel P_(xy). Please refer to FIG. 2. FIG. 2 is a flowchart illustratingdetailed steps of step 102 for generating the deviation level. The stepsare described as follows:

-   Step 1021: Start;-   Step 1022: Determine a pixel set P_(mn) corresponding to the    selected pixel P_(xy) according to a predetermined rule;-   Step 1023: Multiply a brightness value of each pixel in the pixel    set P_(mn) respectively by a preset weighted factor;-   Step 1024: Sum up multiplied brightness values of all pixels in the    pixel set for generating a sum result;-   Step 1025: Divide the sum result by the number of the pixels in the    pixel set for generating an average brightness value M_(mn);-   Step 1026: Divide the original brightness value B_(original) of the    pixel P_(xy) by the average brightness value M_(mn) for generating a    brightness variation V;-   Step 1027: Adjust the brightness variation V to generate an adjusted    brightness variation F;-   Step 1028: Generate the deviation level according to a following    equation: D=1+C_(local) _(—) _(gain)×F, wherein D represents the    deviation level, C_(local) _(—) _(gain) represents a local gain, and    F represents the adjusted brightness variation;-   Step 1029: End.

In Step 1022˜1025, weighted-averaging process are executed onto thebrightness values of the pixels in the pixel set P_(mn) for generatingan average brightness value.

In Step 1026˜1028, the original brightness value B_(original) of theselected pixel P_(xy) is compared with the average brightness valueM_(mn) for generating the deviation level D.

In Step 1022, the pixel set P_(mn) can be determined by a predeterminedrule. For example, the pixel set can comprise pixels peripheral to theselected pixel such as P_((x−1,y−1)), P_((x−1,y+1)), P_((x+1,y−1)), andP_((x+1,y+1)).

In Step 1023, the brightness value B_(ij) of each pixel P_(ij) in thepixel set P_(mn) is respectively multiplied by a corresponding presetweighted factor a_(ij).

In step 1026, dividing the original brightness value B_(original) of thepixel P_(xy) by the average brightness value M_(mn) for generating thebrightness variation can be expressed in the following expressions (3)or (4):V=B _(original) /M _(mn)  (3)V=B _(original)/(M _(mn) +C _(anti) _(—) _(noise))  (4)

wherein V designates the brightness variation, B_(original) designatesthe original brightness of the pixel P_(xy), M_(mn) designates theaverage brightness value, and C_(anti) _(—) _(noise) designates aconstant.

For noise issues, the expression (4) is added into a constant C_(anti)_(—) _(noise) to reduce noise effects in the area.

In step 1027, to adjust the brightness variation V is to limit thebrightness variation within an appropriate range. The adjustedbrightness variation F can be derived from taking the log of thebrightness variation as the following expression: F=log(V). Therefore,the adjusted brightness variation F falls in an appropriate range.

Therefore, from the foregoing, it is well understood that the saturationof the area A of the image can be enhanced according to the localcontrast.

Please refer to FIG. 3. FIG. 3 is a flowchart illustrating a method 300for adjusting contrast of an area of an image according to a secondembodiment of the present invention. The image mentioned in the presentinvention can comprise only one area or a plurality of areas. The areamentioned in the present invention does not have to be rectangular, andinstead, the area can be any shape as desired. The spirit of method 300according to the second embodiment of the present invention is adjustingthe contrast of the area according to the global gain and the localgain. The method 300 utilizes (1) the brightness differences between apixel in the area and a pixel set in the vicinity of the pixel, to wherethe local gain applies, and (2) the brightness characteristic of thearea, to where the global gain applies, to adjust the contrast of thearea. Additionally, the brightness mentioned in the present inventioncan be expressed and defined in different color spaces such RGB, HSV,and YC_(b)C_(r). The transformations for brightness between differentcolor spaces are familiar for those skilled in the art and are omitted.

It is assumed that an area A, a pixel P_(xy) in the area A, and a pixelset P_(mn) of the pixel P_(xy) is selected. The steps are described asfollows:

-   Step 301: Start;-   Step 302: Calculate a deviation level of the pixel P_(xy) in an    area;-   Step 303: Calculate a global gain for the area A;-   Step 304: Calculate a modified brightness value of the pixel    according to the deviation level, the global gain and an original    brightness value of the pixel;-   Step 305: End.

In step 303, the global gain can be obtained according to the brightnesscharacteristic of the area A, for example, if the brightness average ofthe area A is lower, the global gain is higher, and vice versa.

Therefore, the method 300 can be expressed in the following expressions(5) or (6):B _(modified) =B _(original) ×C _(global) _(—) _(gain) ×D  (5)B _(modified) =B _(original)×[1+(C _(global) _(—) _(gain)−1)×D]  (6)

wherein B_(modified) designates the modified brightness value of thepixel P_(xy), B_(original) designates the original brightness value ofthe pixel P_(xy), C_(global) _(—) _(gain) designates the global gain forthe area, and D designates the deviation level of the pixel P_(xy).

In the expression (5), the modified brightness value B_(modified) can beadjusted as the global gain C_(global) _(—) _(gain) adjusts. In theexpression (6), the modified brightness value B_(modified) remainsunchanged when the global gain C_(global) _(—) _(gain) is set to be 1,and therefore the expression (6) ignores the deviation level D when theglobal gain C_(global) _(—) _(gain) is set to be 1.

In step 302, the deviation level of the selected pixel P_(xy) isgenerated according to the brightness differences between the selectedpixel P_(xy) and a pixel set P_(mn) in the vicinity of the selectedpixel P_(xy). Please refer to FIG. 4. FIG. 4 is a flowchart illustratingdetailed steps of step 302 for generating the deviation level. The stepsare described as follows:

-   Step 3021: Start;-   Step 3022: Determine a pixel set P_(mn) of the selected pixel P_(xy)    according to a predetermined rule;-   Step 3023: Multiply a brightness value of each pixel in the pixel    set P_(mn) respectively by a preset weighted factor;-   Step 3024: Sum up multiplied brightness values of all pixels in the    pixel set for generating a sum result;-   Step 3025: Divide the sum result by the number of the pixels in the    pixel set for generating an average brightness value M_(mn);-   Step 3026: Divide the original brightness value B_(original) of the    pixel by the average brightness value M_(mn) for generating a    brightness variation V;-   Step 3027: Adjust the brightness variation V to generate an adjusted    brightness variation F;-   Step 3028: Generate the deviation level according to a following    equation: D=1+C_(local) _(—) _(gain)×F, wherein D represents the    deviation level, C_(local) _(—) _(gain) represents a local gain, and    F represents the adjusted brightness variation;-   Step 3029: End.

In Step 3022˜3025, weighted-averaging process are executed onto thebrightness values of the pixels in the pixel set P_(mn) for generatingan average brightness value.

In Step 3026˜3028, the original brightness value B_(original) of theselected pixel P_(xy) is compared with the average brightness valueM_(mn) for generating the deviation level D.

In Step 3022, the pixel set P_(mn) can be determined by a predeterminedrule. For example, the pixel set can comprise pixels peripheral to theselected pixel such as P_((x−1,y−1)), P_((x−1,y+1)), P_((x+1,y−1)), andP_((x+1,y+1)). Alternatively, the pixel set is distributed in a portionof the area of the image. For example, the pixel set includes multiplepixels that are only a part of pixels in the area of the image. Foranother example, pixels in the pixel set are fall within the scope ofthe area of the image but are not all pixels in the area of the image.

In Step 3023, the brightness value B_(ij) of each pixel P_(ij) in thepixel set P_(mn) is respectively multiplied by a corresponding presetweighted factor a_(ij).

In step 3026, dividing the original brightness value B_(original) of thepixel P_(xy) by the average brightness value M_(mn) for generating thebrightness variation V can be expressed in the following expressions (7)or (8):V=B _(original) /M _(mn)  (7)V=B _(original)/(M _(mn) +C _(anti) _(—) _(noise))  (8)

wherein V designates the brightness variation, B_(original) designatesthe original brightness of the pixel P_(xy), M_(mn) designates theaverage brightness value, and C_(anti) _(—) _(noise) designates aconstant.

For noise issues, the expression (8) is added into a constant C_(anti)_(—) _(noise) to reduce noise effects in the area.

In step 3027, to adjust the brightness variation V is to limit thebrightness variation within an appropriate range. The adjustedbrightness variation F can be derived from taking the log of thebrightness variation as the following expression: F=log(V). Therefore,the adjusted brightness variation F falls in an appropriate range.

Therefore, from the foregoing, it is well understood that the contrastof the area A of the image can be enhanced according to the localcontrast and the brightness characteristic of the area.

Please refer to FIG. 5. FIG. 5 is a diagram illustrating an electronicapparatus 500 according to the first embodiment of the presentinvention. The electronic apparatus 500 comprises a storage unit 510, adisplay 520, and a processor 530. The electronic apparatus 500 can berealized with a TV set, a computer, a cellular phone, or a PersonalDigital Assistant (PDA). The storage unit 510 is disposed for storinginformation of the image. The display 520 is disposed for showing theimage. The processor 530 is disposed for modifying saturation of an areaA of an image.

The processor 530 comprises a deviation calculation device 531, amodification calculation device 532, and a global gain calculatingdevice 533. The deviation calculation device 531 is disposed forcalculating a deviation level D of a pixel P_(xy) in the area A of theimage. The modification calculation device 532 is disposed forcalculating a modified saturation value S_(modified) of the pixel P_(xy)in the area A. The global gain calculation device 533 is disposed forcalculating a global gain C_(global) _(—) _(gain) for the area A of theimage.

The deviation calculation device 531 comprises a weighted-averagingdevice 5311 and a comparing device 5312. The weighted-averaging device5311 is disposed for weighted-averaging brightness values of the pixelsin the pixel set P_(mn) so as to generate the average brightness valueM_(mn). The comparing device 5312 is disposed for comparing the originalbrightness value B_(original) of the pixel P_(xy) with the averagebrightness value M_(mn) so as to generate the deviation level D.

The weighted-averaging device 5311 comprises a multiplying device 53111,a summing device 53112, and a dividing device 53113. The multiplyingdevice 53111 is disposed for multiplying a brightness value of eachpixel in the pixel set P_(mn) respectively by a preset weighted factor.The summing device 53112 is disposed for summing up multipliedbrightness values of all pixels in the pixel set P_(mn) for generating asum result. The dividing device 53113 is disposed for dividing the sumresult by the number of the pixels in the pixel set for generatingaverage brightness value M_(mn).

The comparing device 5312 comprises a dividing device 53121, anadjusting device 53122, and a deviation level generating device 53123.The dividing device 53121 is disposed for dividing the originalbrightness value B_(original) of the pixel P_(xy) by the averagebrightness value M_(mn) or by the average brightness value M_(mn) and ananti-noise constant for generating a brightness variation V according tothe following expressions: V=(B_(original)/M_(mn)) orV=[B_(original)/(M_(mn)+C_(anti) _(—) _(noise))]. The adjusting device53122 is disposed for adjusting the brightness variation V to generatean adjusted brightness variation F according to the following equation:F=log(V). The deviation level generating device 53123 is disposed forgenerating the deviation level D according to a following expression:D=1+C_(local) _(—) _(gain)×F, wherein D represents the deviation level,C_(local) _(—) _(gain) represents a local gain, and F represents theadjusted brightness variation.

The modification calculation device 532 calculates the modifiedsaturation value S_(modified) of the pixel P_(xy) in the area A of theimage selectively according to the following equations:S _(modified) =S _(original) ×D,  (1)S _(modified) =S _(original) ×C _(global) _(—) _(gain) ×D, or  (2)S _(modified) =S _(original)×[1+(C _(global) _(—) _(gain)−1)×D],  (3)

wherein S_(modified) designates the modified saturation value,S_(original) designates the original saturation value, C_(global) _(—)_(gain) designates the global gain, and D designates the deviationlevel.

To sum up, the present invention provides a method to enhance saturationof an area of an image according to the local contrast of the area andthe saturation characteristic of the area. Furthermore, the presentinvention provides another method to enhance contrast of an area of animage according to the local contrast of the area and the brightnesscharacteristic of the area. The two methods both increase efficiency andconvenience.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

1. A method for adjusting saturation of an area of an image for theimage to be displayed in an electronic system, the electronic systemcomprising a storage unit for storing information of the image and aprocessor, the method comprising: calculating a deviation level of apixel in the area of the image by the processor, the deviation levelindicating brightness differences of the brightness values among thepixel and a pixel set in a vicinity of the pixel in the area of theimage, the pixel set comprising pixels in the vicinity of the pixel ofthe area of the image; and calculating a modified saturation value ofthe pixel in the area of the image according to the deviation level ofthe pixel in the area of the image and an original saturation value ofthe pixel in the area of the image to achieve saturation adjustment ofthe pixel in the area of the image by the processor.
 2. The method ofclaim 1 wherein calculating the deviation level of the pixel in the areaof the image comprises: weighted-averaging brightness values of thepixels in the pixel set for generating an average brightness value; andcomparing an original brightness value with the average brightness valuefor generating the deviation level.
 3. The method of claim 2 whereinweighted-averaging the brightness values of the pixels in the pixel setfor generating the average brightness value comprises: multiplying abrightness value of each pixel in the pixel set respectively by a presetweighted factor; summing up multiplied brightness values of all pixelsin the pixel set for generating a sum result; and dividing the sumresult by a number of the pixels in the pixel set for generating theaverage brightness value.
 4. The method of claim 2 wherein comparing theoriginal brightness value with the average brightness value forgenerating the deviation level comprises: dividing the originalbrightness value of the pixel by the average brightness value forgenerating a brightness variation; adjusting the brightness variation togenerate an adjusted brightness variation; and generating the deviationlevel according to a following equation: D=1+C×F, wherein D representsthe deviation level, C represents a local gain, and F represents theadjusted brightness variation.
 5. The method of claim 2 whereincomparing the original brightness value with the average brightnessvalue for generating the deviation level comprises: dividing theoriginal brightness value of the pixel by the average brightness valueand an anti-noise factor for generating an brightness variation;adjusting the brightness variation to generate an adjusted brightnessvariation; and generating the deviation level according to a followingequation: D=1+L×F, wherein D represents the deviation level, Lrepresents a local gain, and F represents the adjusted brightnessvariation.
 6. The method of claim 1 wherein calculating a modifiedsaturation value of the pixel in the area of the image according to thedeviation level and the original saturation value of the pixel comprisescalculating a modified saturation value of the pixel of the area of theimage according to a following equation: M=S×D, wherein M represents themodified saturation value of the pixel, S represents the originalsaturation value of the pixel, and D represent the deviation level. 7.The method of claim 1 further comprising calculating a global gain forthe area of the image by the processor.
 8. The method of claim 7 whereincalculating the modified saturation value of the pixel in the area ofthe image according to the deviation level of the pixel in the area ofthe image and the original saturation value of the pixel in the area ofthe image to achieve saturation adjustment of the pixel in the area ofthe image is calculating the modified saturation value of the pixel inthe area of the image according to the deviation level of the pixel inthe area of the image, the global gain, and the original saturationvalue of the pixel in the area of the image to achieve saturationadjustment of the pixel in the area of the image.
 9. The method of claim8 wherein calculating the modified saturation value of the pixel in thearea of the image according to the deviation level of the pixel in thearea of the image, the global gain, and the original saturation value ofthe pixel in the area of the image to achieve saturation adjustment ofthe pixel in the area of the image comprises calculating the modifiedsaturation value of the pixel in the area of the image according to afollowing equation: M=S×G×D, wherein M represents the modifiedsaturation value of the pixel, S represents the original saturationvalue of the pixel, G represents the global gain, and D represents thedeviation level.
 10. The method of claim 8 wherein calculating themodified saturation value of the pixel in the area of the imageaccording to the deviation level of the pixel in the area of the image,the global gain, and the original saturation value of the pixel in thearea of the image to achieve saturation adjustment of the pixel in thearea of the image comprises calculating the modified saturation value ofthe pixel in the area of the image according to a following equation:M=S×[1+(G−1)×D], wherein M represents the modified saturation value ofthe pixel, I represents the original saturation value of the pixel, Grepresents the global gain, and D represents the deviation level.
 11. Amethod for adjusting contrast of an area of an image, comprising:calculating a local contrast of a pixel set in a vicinity of a pixel bya processor, wherein the pixel is selected from the area and the pixelset is distributed in a portion of the area; calculating a global gainfor the area according to brightness characteristic of the area by theprocessor; and calculating a modified brightness value of the pixelaccording to the local contrast, the global gain and an originalbrightness value of the pixel by the processor, so that contrast of thepixel is adjusted with the modified brightness value of the pixel. 12.The method of claim 11 wherein the local contrast is defined by adeviation level of the pixel, and the deviation level indicatesbrightness differences among the pixel and the pixel set in the vicinityof the pixel.
 13. The method of claim 12 wherein the deviation level isdetermined according to a local gain.
 14. The method of claim 12 whereincalculating the deviation level of the pixel in the area comprises:weighted-averaging brightness values of the pixels in the pixel set forgenerating an average brightness value; and comparing the originalbrightness value with the average brightness value for generating thedeviation level.
 15. The method of claim 14 wherein weighted-averagingbrightness values of the pixels in the pixel set for generating theaverage brightness value comprises: multiplying a brightness value ofeach pixel in the pixel set respectively by a preset weighted factor;summing up multiplied brightness values of all pixels in the pixel setfor generating a sum result; and dividing the sum result by a number ofthe pixels in the pixel set for generating the average brightness value.16. The method of claim 14 wherein comparing the original brightnessvalue with the average brightness value for generating the deviationlevel comprises: dividing the original brightness value of the pixel bythe average brightness value for generating an brightness variation;adjusting the brightness variation to generate an adjusted brightnessvariation; and generating the deviation level according to a followingequation: D=1+C×F, wherein D represents the deviation level, Crepresents a local gain, and F represents the adjusted brightnessvariation.
 17. The method of claim 14 wherein comparing the originalbrightness value with the average brightness value for generating thedeviation level comprises: dividing the original brightness value of thepixel by the average brightness value and an anti-noise factor forgenerating an brightness variation; adjusting the brightness variationto generate an adjusted brightness variation; and generating thedeviation level according to a following equation: D=1+L×F, wherein Drepresents the deviation level, L represents a local gain, and Frepresents the adjusted brightness variation.
 18. The method of claim 12wherein calculating a modified brightness value of the pixel accordingto the deviation level, the global gain and the original brightnessvalue of the pixel comprises calculating a modified brightness value ofthe pixel according to a following equation: M=I×G×D, wherein Mrepresents the modified brightness value of the pixel, I represents theoriginal brightness value of the pixel, G represents the global gain,and D represents the deviation level.
 19. The method of claim 12 whereincalculating a modified brightness value of the pixel according to thedeviation level, the global gain and the original brightness value ofthe pixel comprises calculating a modified brightness value of the pixelaccording to a following equation: M=I×[1+(G−1)×D], wherein M representsthe modified brightness value of the pixel, I represents the originalbrightness value of the pixel, G represents the global gain, and Drepresents the deviation level.
 20. The method of claim 11 wherein thepixel set is determined by a predetermined rule.